﻿namespace VideoTools.SubtitleEdit.BluRaySup
{
    /// <summary>
    /// contains offset and size of one update of a palette
    /// </summary>
    public class PaletteInfo
    {
        /// <summary>
        /// number of palette entries
        /// </summary>
        public int PaletteSize { get; set; }

        /// <summary>
        /// raw palette data
        /// </summary>
        public byte[] PaletteBuffer { get; set; }

        public PaletteInfo()
        {
        }

        public PaletteInfo(PaletteInfo paletteInfo)
        {
            PaletteSize = paletteInfo.PaletteSize;
            PaletteBuffer = new byte[paletteInfo.PaletteBuffer.Length];
            Buffer.BlockCopy(paletteInfo.PaletteBuffer, 0, PaletteBuffer, 0, PaletteBuffer.Length);
        }

    }
}
